﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using WebMatrix.WebData;

using BEX.WebUI.Entities;

namespace BEX.WebUI
{
    public static class SourceUser
    {


        public static string Username
        {
            get
            {
                return HttpContext.Current.User.Identity.Name;
            }
        }


        private static int? accountId = null;

        public static int AccountId
        {
            get
            {
                if (accountId == null)
                {
                    BTC_SMSEntities db = new BTC_SMSEntities();
                   accountId = WebSecurity.GetUserId(Username);
                }

                return (int)accountId;
            }
        }
    }
}